package svgedit.japangui.actions;

import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;

import svgedit.gui.DocumentPropertiesDialog;
import svgedit.japangui.JapanFrame;

/** Shows the document properties dialog.
 */
@SuppressWarnings("serial")
public class EditDocumentPropertiesAction extends AbstractAction {

    private JapanFrame japanFrame;

    /** Create this action for the given frame */
    public EditDocumentPropertiesAction(JapanFrame japanFrame) {
        super("\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306E\u30D7\uFF9B\u30D1\uFF83\u30A3...");
        this.japanFrame = japanFrame;
    }

    public void actionPerformed(ActionEvent ae) {
        DocumentPropertiesDialog dlg = new DocumentPropertiesDialog(japanFrame.getDocument());
        dlg.setModal(true);
        dlg.setLocationRelativeTo(japanFrame);
        dlg.setVisible(true);
        japanFrame.repaint();
    }

}
